package com.csun.cmny.provider.model.dto;

import com.csun.cmny.provider.validator.OmcExpenseTypeAddValidator;
import com.csun.cmny.provider.validator.OmcExpenseTypeEditValidator;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class ExpenseTypeDto implements Serializable {

    private static final long serialVersionUID = -5760217247264365990L;

    /*
    * 消费类别id
    * */
    @NotNull(message = "{ExpenseType.id.null}",
            groups = {OmcExpenseTypeEditValidator.class})
    private Long id;

    /**
     * 费用类型名称
     */
    @NotNull(message = "{ExpenseType.name.null}",
            groups = {OmcExpenseTypeAddValidator.class})
    @NotEmpty(message = "{ExpenseType.name.null}",
            groups = {OmcExpenseTypeAddValidator.class})
    @NotEmpty(message = "{ExpenseType.name.null}",
            groups = {OmcExpenseTypeEditValidator.class})
    private String name;

    /**
     * 是否可多选：0-不行，1-可以
     */
    @NotNull(message = "{ExpenseType.canMultipleChoose.null}",
            groups = {OmcExpenseTypeAddValidator.class})
    private Integer canMultipleChoose;

    /**
     * 是否必选一个：0-不是，1-是
     */
    @NotNull(message = "{ExpenseType.needSelectOne.null}",
            groups = {OmcExpenseTypeAddValidator.class})
    private Integer needSelectOne;

    /**
     * 是否默认选中第一个：0-否，1-是
     */
    @NotNull(message = "{ExpenseType.isSelectFirstone.null}",
            groups = {OmcExpenseTypeAddValidator.class})
    private Integer isSelectFirstone;

    /**
     * 备注
     */
    private String remark;

    /**
     * 组织Id
     */
    private Long groupId;
}
